home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr27 / iswht10.zip / IW_DEMO.BAT < prev   
DOS Batch File  |  1995-03-26  |  3KB  |  95 lines

  1. @echo off
  2. REM Demonstration File for IsWhat 1.0
  3. cls
  4. echo This batchfile will demonstrate some of the uses and results of
  5. echo using IsWhat in your batch files.
  6. echo.
  7. echo You can modify the errorlevel checks to match current
  8. echo days, month etc. to get correct and incorrect answers, so you
  9. echo see the difference.
  10. echo.
  11. echo Press Ctl-C to ABORT, or any other to continue....
  12. echo Pressing Ctl-C at any keypress prompt will abort the Demo.
  13. pause > nul
  14. cls
  15. echo Using IsWhat DOW we can determine which day of the week it is... 1-7
  16. echo Let's check to see if its Saturday, thats day 7...
  17. echo Command: IsWhat DOW
  18. echo.
  19. iswhat dow
  20. echo:
  21. if not errorlevel 7 goto Wrongday
  22. if errorlevel 7 goto goodday
  23. :wrongday
  24. echo Nope... not Staurday...
  25. goto endday
  26. :goodday
  27. echo Yep, got the right day!
  28. :endday
  29. echo:
  30. echo Press a key......
  31. pause > nul
  32. cls
  33. echo Using DOM determines what day of the month it is, 1-31
  34. echo lets check for the 25th....
  35. Echo Command: IsWhat dom
  36. echo.
  37. iswhat dom
  38. echo:
  39. if not errorlevel 25 echo It's not the 25th today...
  40. if errorlevel 25 echo It's the 25th alright!
  41. echo Press a key....
  42. pause > nul
  43. cls
  44. echo Using DOY will return the Day of Year, 1-365
  45. echo checking for day 85.....
  46. echo Command: IsWhat doy
  47. echo.
  48. iswhat doy
  49. if not errorlevel 85 echo Nope.....
  50. if errorlevel 85 echo yep...day 85!
  51. echo.
  52. echo press a key.....
  53. pause > nul
  54. cls
  55. echo Suppose we need to perform a job if its March?
  56. echo Using the MONTH command, we can.... March would be errorlevel 3...
  57. echo Command: IsWhat month
  58. echo.
  59. iswhat month
  60. echo.
  61. if not errorlevel 3 echo Wrong Month....
  62. if errorlevel 3 echo Yep, its March... now what??
  63. echo.
  64. echo press a key.....
  65. pause > nul
  66. cls
  67. echo Lets look at the calendar function.... When the calendar is displayed
  68. echo you can scroll around, play with the arrow keys, PgUp/Dn, Home/End.
  69. echo Pressing ENTER will exit and display the date you selected, pressing
  70. echo ESC will simply Exit.
  71. echo Command: IsWhat calendar
  72. echo.
  73. echo Press a key to experience the Calendar function....
  74. pause > nul
  75. iswhat calendar
  76. echo.
  77. echo press a key......
  78. pause > nul
  79. cls
  80. echo IsWhat 1.0 (c)Copyright 1995 Rand Nowell - RaLin Enterprises
  81. echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  82. echo These have been very basic examples.... some things like the
  83. echo DATENAME function must be checked from the command line.
  84. echo And of course, with some creative batchfile writting, you can
  85. echo make great use of IsWhat!
  86. echo.
  87. echo Hope you find IsWhat a handy tool!
  88. echo IsWhat 1.0 from "Cowboy Software!"
  89. echo.
  90. echo Refer to ISWHAT.DOC for detailed information on functions.
  91. echo This is a Free program, but any donations are WELCOME!!
  92.  
  93.  
  94.  
  95.